package com.example.jdbcdemo.mapper;

import com.example.jdbcdemo.pojo.Product;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

//mybatis的mapper类,Dao
//对应Product商品
@Mapper
@Repository
public interface ProductMapper {
    List<Product> queryProductList();//返回商品列表

    Product queryProductById(int id);

    int addProduct(Product product);//增

    int updateProduct(Product product);//改

    int deleteProduct(int id);//删
}
